package daoImpl;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

import dao.XiaotuDao;
import entlty.s_xiaotu;
import utils.BaseDao;

public class XiaotuDaoImpl extends BaseDao implements XiaotuDao{

	@Override
	public List<s_xiaotu> getxt() {
		List<s_xiaotu> list=new ArrayList<s_xiaotu>();
		String sql="select * from s_xiaotu s join shangpin h on s.s_id=h.s_id";
		ResultSet rs=super.exeQuery(sql);
		try {
			while(rs.next()){
				s_xiaotu ss=new s_xiaotu(rs.getInt(1),rs.getString(2),rs.getInt(3));
				list.add(ss);
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		return list;
	}

}
